package cn.live.wechat;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@EnableScheduling
@EnableWebMvc
@SpringBootApplication
public class LiveWechatApplication extends SpringBootServletInitializer implements CommandLineRunner {
    @Override
    public void run(String... strings) throws Exception {
        System.err.println("启动...");
    }

    public static void main(String[] args) {
        SpringApplication.run(LiveWechatApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        //tomcat 启动
        return builder.sources(LiveWechatApplication.class);
    }
}
